package cn.larry.aop.config.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * 仅execution。匹配方法执行的join point。
 * 
 * @author LarryZeal
 *
 */
@Profile("execution")
@Aspect
@Component
public class ExecutionAspect {

	@Pointcut("execution(public * *(..))")
	public void anyPublicOperation() {}

	// @Pointcut("execution(public * cn.larry.aop..*(..))")
	@Pointcut("execution( * cn.larry.aop..*(..))")
	public void anyMyPublicOperation() {}

	// @Pointcut("execution(public * cn.larry.aop.service..*(..))")
	@Pointcut("execution( * cn.larry.aop.service..*(..))")
	public void anyMyPublicOperation2() {}

	// 只拦截接收String的方法
	// @Pointcut("execution(public * cn.larry.aop..*(String))")
	@Pointcut("execution( * cn.larry.aop..*(String))")
	public void anyMyPublicOperation3() {}
	// 只拦截接收String的方法
}
